<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>首页 - 驴妈妈流立方</title>
		<meta name="description" content="overview &amp; stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<link rel="stylesheet" href="${request.contextPath}/assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="${request.contextPath}/assets/font-awesome/4.2.0/css/font-awesome.min.css" />
		<link rel="stylesheet" href="${request.contextPath}/assets/css/jquery-ui.custom.min.css" />
		<link rel="stylesheet" href="${request.contextPath}/assets/css/jquery.gritter.min.css" />
		<link rel="stylesheet" href="${request.contextPath}/assets/fonts/fonts.googleapis.com.css" />
		<link rel="stylesheet" href="${request.contextPath}/assets/css/bootstrapValidator.min.css" />
		<link rel="stylesheet" href="${request.contextPath}/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
		<link rel="stylesheet" href="${request.contextPath}/stylesheets/daterangepicker.css">
		<link rel="stylesheet" href="${request.contextPath}/assets/css/bootstrap.css" />
		<link rel="stylesheet" href="${request.contextPath}/stylesheets/loading.css" />
		<link rel="stylesheet" href="${request.contextPath}/stylesheets/funnel.css" />
		<link rel="stylesheet" href="${request.contextPath}/stylesheets/tips.css"/>
		<style>
			.widget-toolbar::before{border:0px;}
			.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
				border-top: 2px solid #C6487E!important;
			}
			.gritter-center{top:40%}
			.table > thead > tr {
				background: linear-gradient(rgb(248, 248, 248) 0px, rgb(236, 236, 236) 100%) repeat-x rgb(242, 242, 242)!important;
			}
		</style>
	</head>

	<body class="no-skin" style="background-color: #FFF;">
		<div class="page-content">
			<!-- <div class="page-header">
				<h1>
					流量转化
					<small>
						<i class="ace-icon fa fa-angle-double-right"></i>
						按单页面查询列表
					</small>
				</h1>
			</div> -->
			
			<div class="tabbable">
				<ul class="nav nav-tabs" id="myTab">
					<li class="active"><a data-toggle="tab" href="#manage" onclick="statistics('#manage');"
						aria-expanded="false"> 不同详情 </a></li>
	
					<li class=""><a data-toggle="tab" href="#statistics" onclick="statistics('#statistics');" 
						aria-expanded="true"> 流量来源渠道及占比 </a></li>
				</ul>
			
				<div class="tab-content">
					<div id="manage" class="tab-pane active in">
					
						<div class="tabbable">流量类型
							<ul class="nav nav-tabs" id="flowType" >
								<li class="active"><a data-toggle="tab" href="#app" onclick="statistics('#app');"
									aria-expanded="false"> APP直接访问 </a></li>
								<li class=""><a data-toggle="tab" href="#m"  onclick="statistics('#pc');"
									aria-expanded="true"> PC直接访问 </a></li>
								<li class=""><a data-toggle="tab" href="#m"  onclick="statistics('#m');"
									aria-expanded="true"> WAP站直接访问 </a></li>
								<!-- <li class=""><a data-toggle="tab" href="#project" onclick="statistics('#project');"
									aria-expanded="true"> 专题 </a></li> -->
								<li class=""><a data-toggle="tab" href="#sem" onclick="statistics('#sem');"
									aria-expanded="true"> SEM </a></li>
								<li class=""><a data-toggle="tab" href="#seo" onclick="statistics('#seo');"
									aria-expanded="true"> SEO </a></li>
								<li class=""><a data-toggle="tab" href="#socialSharing" onclick="statistics('#socialSharing');"
									aria-expanded="true"> 社交分享 </a></li>
								<li class=""><a data-toggle="tab" href="#customizeFunnel" onclick="statistics('#customizeFunnel');" 
									aria-expanded="true">自定义漏斗 </a></li>
							</ul>
							<div class="tab-content">
								<div id="app" class="tab-pane active in">
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group">
														    		<label for="exampleInputName2">选择时段</label>
														    		<input type="text" id="config-demo" name="chooseTimeVO" class="form-control time" >
														    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																<div class="form-group">
																	<label for="exampleInputName2">访问类型</label>
																	<div class="btn-group">
																		<label class="btn btn-sm btn-link">
																			<input type="radio" name="flow_type" checked value="pv"> PV
																		</label>
																		<label class="btn btn-sm btn-link"> 
																			<input type="radio" name="flow_type" value="uv"> UV
																		</label>
																		<label class="btn btn-sm btn-link">
																			<input type="radio" name="flow_type" value="session"> SESSION
																		</label>
																	</div>
																</div>
																<div class="form-group">
														    		<label for="exampleInputName2">平台</label>
													    			<select data-placeholder="" class="chosen-select" tabindex="2" 
													    				name="plat_form" id="plat_form" onchange="selectAppVersion();">
																		<option value="">全部</option>
																		<option value="ios">IOS</option>
																		<option value="android">安卓</option>
																	</select>
														    	</div>
														<!--    	<div class="form-group" style="display: none;">
														    		<label for="exampleInputName2">版本类型</label>
													    			<select data-placeholder="" class="chosen-select" tabindex="2"  
													    				name="app_version" id="app_version">
																		<option value="">全部</option>
																	</select>
														    	</div> --> 
														    	<div class="form-group">
																  	<button id="app_search" type="button"  onclick="searchClick('main1','app','app_category_id','#dataAPP');" class="btn btn-pink btn-sm">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
																		Search
																	</button>
																</div>
													    	</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>
									
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-body">
													<div class="widget-main">
														<form class="form-inline">
															<!-- <div class="form-group col-xs-2">
													    		<label for="exampleInputName2">路径类型</label>
													    		<select class="form-control" name="isAdd" id="isAdd" >
																	<option value="">全部</option>
																	<option value="">搜索</option>
																	<option value="">非搜索</option>
																</select>
													    	</div>  -->
													    	<div class="form-group">
													    		<label for="exampleInputName2">详情页类型</label>
														    		<select data-placeholder="" class="chosen-select" tabindex="2"
																		name="app_category_id" id="app_category_id" onchange="changeCategory(this.value,'main1','路径页','#dataAPP');">
																		<option value="">全部</option>
																		<#list vSTProductlist as vSTProduct>
																			<option value="${vSTProduct.value}">${vSTProduct.showName}</option>
																		</#list>
																	</select>
													    	</div>
													    </form>
												    </div>
												    <div class="widget-main row">
												    	<div class="col-xs-8">
												    		<div id="main1" style="width: 100%; height: 500px; margin: 0 auto;"></div>
												    		<!-- <div id="main1" style="width:971px;height:500px;"></div>  -->
												    	</div>
												    	<div class="col-xs-4">
												    		<br>
													    	<br>
													    	<br>
													    	<br>
												    		<table  class="table table-striped table-bordered table-hover" style="margin-bottom: 0px;border-bottom: 0px;">
																<thead>
																	<tr>
																		<th>序号</th>
																		<th>比值内容</th>
																		<th>占比</th>
																	</tr>
																</thead>					
																<tbody id="dataAPP">
																</tbody>
															</table>		
												    	</div>
												    </div>
												    <br>
												    <br>
												    <br>
												</div>
											</div>
										</div>
									</div>
								</div>
								
								
								<div id="m" class="tab-pane" style="display:none;">
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group">
														    		<label for="exampleInputName2">选择时段</label>
														    		<input type="text" id="config-demo2" name="chooseTimeVO" class="form-control time" >
														    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																
																<div class="form-group">
																	<label for="exampleInputName2">访问类型</label>
																	<div class="btn-group">
																		<label class="btn btn-sm btn-link">
																			<input type="radio" name="flow_type2" checked value="pv">PV
																		</label>
																		<label class="btn btn-sm btn-link">
																			<input type="radio" name="flow_type2" value="uv"> UV
																		</label>
																		<label class="btn btn-sm btn-link">
																			<input type="radio" name="flow_type2" value="session"> SESSION
																		</label>
																	</div>
																</div>
																<!--<div class="form-group"  id="selectPlatform2" style="padding-left: 15px;">
																	<label for="exampleInputName2">平台</label>
																	<select data-placeholder="" class="chosen-select" tabindex="2" name="plat_form2" id="plat_form2">
																		<option value="">全部</option>
																		<option value="PC">PC</option>
																		<option value="wap">WAP</option>
																	</select>
																</div>-->
																<div class="form-group">
																  	<button id="wap_search" type="button"   onclick="searchClick2('main2','Wap','category_id2','#dataM');"  class="btn btn-pink btn-sm">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
																		Search
																	</button>
																</div>
													    	</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>
									
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-body">
													<div class="widget-main">
														<form class="form-inline">
															<!-- <div class="form-group col-xs-2">
													    		<label for="exampleInputName2">路径类型</label>
													    		<select class="form-control" name="isAdd" id="isAdd" >
																	<option value="">全部</option>
																	<option value="">搜索</option>
																	<option value="">非搜索</option>
																</select>
													    	</div> -->
													    	<div class="form-group">
													    		<label for="exampleInputName2">详情页类型</label>
													    			<select data-placeholder="" class="chosen-select" tabindex="2"
																		name="category_id2" id="category_id2"  onchange="changeCategory(this.value,'main2','路径页','#dataM');">
																		<option value="">全部</option>
																		<#list vSTProductlist as vSTProduct>
																			<option value="${vSTProduct.value}">${vSTProduct.showName}</option>
																		</#list>
																	</select>
													    	</div>
													    </form>
												    </div>
												    <div class="widget-main row">
												    	<div class="col-xs-8">
												    		<div id="main2" style="width: 100%; height: 500px; margin: 0 auto;"></div>
												    		<!-- <div id="main2" style="width:971px;height:500px;"></div> -->
												    	</div>
												    	<div class="col-xs-4">
												    		<br>
													    	<br>
													    	<br>
													    	<br>
												    		<table  class="table table-striped table-bordered table-hover" style="margin-bottom: 0px;border-bottom: 0px;">
																<thead>
																	<tr>
																		<th>序号</th>
																		<th>比值内容</th>
																		<th>占比</th>
																	</tr>
																</thead>					
																<tbody id="dataM">
																</tbody>
															</table>		
												    	</div>
												    </div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div id="project" class="tab-pane" style="display:none;">
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main row">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group col-xs-2">
														    		<label for="exampleInputName2">选择时段:</label>
														    		<input type="text" id="config-demo3" name="chooseTimeVO" class="form-control time" >
														    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																<div class="form-group col-xs-2">
														    		<label for="exampleInputName2">专题页名称</label>
														    		<select data-placeholder="" class="chosen-select" tabindex="2"
														    			name="top_name" id="top_name" >
																	</select>
														    	</div>
																<div class="form-group col-xs-1">
																  	<button id="topic_search"  type="button"   onclick="searchClick3('main3','Topic','category_id3','#dataProject');"  class="btn btn-pink btn-sm">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
																		Search
																	</button>
																</div>
													    	</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>
									
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-body">
													<div class="widget-main">
														<form class="form-inline">
													    	<div class="form-group">
													    		<label for="exampleInputName2">详情页类型</label>
													    		<select data-placeholder="" class="chosen-select" tabindex="2"
													    			name="category_id3" id="category_id3" onchange="changeCategory(this.value,'main3','专题页','#dataProject');">
																	<option value="">全部</option>
																	<#list vSTProductlist as vSTProduct>
																		<option value="${vSTProduct.value}">${vSTProduct.showName}</option>
																	</#list>
																</select>
													    	</div>
													    </form>
												    </div>
												    <div class="widget-main row">
												    	<div class="col-xs-8">
												    		<div id="main3" style="width: 100%; height: 500px; margin: 0 auto;"></div>
												    		<!-- <div id="main3" style="width:971px;height:500px;"></div> -->
												    	</div>
												    	<div class="col-xs-4">
												    		<br>
													    	<br>
													    	<br>
													    	<br>
												    		<table  class="table table-striped table-bordered table-hover" style="margin-bottom: 0px;border-bottom: 0px;">
																<thead>
																	<tr>
																		<th>序号</th>
																		<th>比值内容</th>
																		<th>占比</th>
																	</tr>
																</thead>					
																<tbody id="dataProject">
																</tbody>
															</table>		
												    	</div>
												    </div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div id="sem" class="tab-pane" style="display:none;">
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group">
														    		<label for="exampleInputName2">选择时段</label>
														    		<input type="text" id="config-demo4" name="chooseTimeVO" class="form-control time" value="">
														    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																<div class="form-group">
														    		<label for="exampleInputName2">SEM着陆页名称</label>
														    		<select data-placeholder="" class="chosen-select" tabindex="2"
																	name="semPage" id="semPage">
																	<option value="">全部</option>
																	<#list semSeoCodeList as semSeoCode>
																			<option value="${semSeoCode.code}">${semSeoCode.name}</option>
																		</#list>
																	</select>
													    		</div>
																<div class="form-group">
																  	<button id="sem_search"  type="button"   onclick="searchClick4('main4','SEM','category_id4','#dataSEM');"  class="btn btn-pink btn-sm">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
																		Search
																	</button>
																</div>
													    	</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>
									
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-body">
													<div class="widget-main">
														<form class="form-inline">
															<!-- <div class="form-group col-xs-2">
													    		<label for="exampleInputName2">SEM着陆页名称</label>
													    		<select class="form-control" name="isAdd" id="isAdd" >
																</select>
													    	</div> -->
													    	<div class="form-group">
													    		<label for="exampleInputName2">详情页类型</label>
													    		<select data-placeholder="" class="chosen-select" tabindex="2"
																	name="category_id4" id="category_id4" onchange="changeCategory(this.value,'main4','SEM着陆页','#dataSEM');">
																	<option value="">全部</option>
																	<#list vSTProductlist as vSTProduct>
																			<option value="${vSTProduct.value}">${vSTProduct.showName}</option>
																		</#list>
																	</select>
													    	</div>
													    </form>
												    </div>
												    <div class="widget-main row">
												    	<div class="col-xs-8">
												    		<div id="main4" style="width: 100%; height: 500px; margin: 0 auto;"></div>
												    		<!-- <div id="main4" style="width:971px;height:500px;"></div> -->
												    	</div>
												    	<div class="col-xs-4">
												    		<br>
													    	<br>
													    	<br>
													    	<br>
												    		<table  class="table table-striped table-bordered table-hover" style="margin-bottom: 0px;border-bottom: 0px;">
																<thead>
																	<tr>
																		<th>序号</th>
																		<th>比值内容</th>
																		<th>占比</th>
																	</tr>
																</thead>					
																<tbody id="dataSEM">
																</tbody>
															</table>		
												    	</div>
												    </div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div id="seo" class="tab-pane">
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group">
														    		<label for="exampleInputName2">选择时段</label>
														    		<input type="text" id="config-demo5" name="chooseTimeVO" class="form-control time" value="">
														    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																<div class="form-group">
														    		<label for="exampleInputName2">SEO流量来源</label>
														    		<select data-placeholder="" class="chosen-select" tabindex="2"
																	name="seoSource" id="seoSource">
																	<option value="">全部</option>
																	<#list seoCodeList as seoCode>
																			<option value="${seoCode.code}">${seoCode.name}</option>
																		</#list>
																	</select>
													    		</div>
													    		<div class="form-group">
														    		<label for="exampleInputName2">SEO着陆页名称</label>
														    		<select data-placeholder="" class="chosen-select" tabindex="2"
																	name="seoPage" id="seoPage">
																	<option value="">全部</option>
																	<#list semSeoCodeList as semSeoCode>
																			<option value="${semSeoCode.code}">${semSeoCode.name}</option>
																		</#list>
																	</select>
													    		</div>
																<div class="form-group">
																  	<button id="seo_search"  type="button"   onclick="searchClick5('main5','SEO','category_id5','#dataSEO');" class="btn btn-pink btn-sm">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
																		Search
																	</button>
																</div>
													    	</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>
									
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-body">
													<div class="widget-main">
														<form class="form-inline">
													    	<div class="form-group">
													    		<label for="exampleInputName2">详情页类型</label>
													    			<select data-placeholder="" class="chosen-select" tabindex="2"
																	name="category_id5" id="category_id5" onchange="changeCategory(this.value,'main5','SEO流量','#dataSEO');">
																	<option value="">全部</option>
																	<#list vSTProductlist as vSTProduct>
																			<option value="${vSTProduct.value}">${vSTProduct.showName}</option>
																		</#list>
																	</select>
													    	</div>
													    </form>
												    </div>
												    <div class="widget-main row">
												    	<div class="col-xs-8">
												    		<div id="main5" style="width: 100%; height: 500px; margin: 0 auto;"></div>
												    		<!-- <div id="main5" style="width:971px;height:500px;"></div> -->
												    	</div>
												    	<div class="col-xs-4">
												    		<br>
													    	<br>
													    	<br>
													    	<br>
												    		<table  class="table table-striped table-bordered table-hover" style="margin-bottom: 0px;border-bottom: 0px;">
																<thead>
																	<tr>
																		<th>序号</th>
																		<th>比值内容</th>
																		<th>占比</th>
																	</tr>
																</thead>					
																<tbody id="dataSEO">
																</tbody>
															</table>		
												    	</div>
												    </div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div id="socialSharing" class="tab-pane">
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group">
														    		<label for="exampleInputName2">选择时段</label>
														    		<input type="text" id="config-demo6" name="chooseTimeVO" class="form-control time" value="">
														    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																<div class="form-group">
														    		<label for="exampleInputName2">社交分享渠道</label>
														    		<select data-placeholder="" class="chosen-select" tabindex="2"
																	name="social" id="social">
																	<option value="">全部</option>
																	<#list socialCodeList as socialCode>
																		<option value="${socialCode.code}">${socialCode.name}</option>
																	</#list>
																	</select>
													    		</div>
																<div class="form-group">
																  	<button id="society_search"  type="button"   onclick="searchClick6('main6','Society','category_id6','#dataSocialSharing');" class="btn btn-pink btn-sm">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
																		Search
																	</button>
																</div>
													    	</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>
									
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-body">
													<div class="widget-main">
														<form class="form-inline">
															
													    	<div class="form-group">
													    		<label for="exampleInputName2">详情页类型</label>
													    		<select data-placeholder="" class="chosen-select" tabindex="2"
																	name="category_id6" id="category_id6" onchange="changeCategory(this.value,'main6','社交分享','#dataSocialSharing');">
																	<option value="">全部</option>
																	<#list vSTProductlist as vSTProduct>
																			<option value="${vSTProduct.value}">${vSTProduct.showName}</option>
																		</#list>
																	</select>
													    	</div>
													    </form>
												    </div>
												    <div class="widget-main row">
												    	<div class="col-xs-8">
												    		<div id="main6" style="width: 100%; height: 500px; margin: 0 auto;"></div>
												    		<!-- <div id="main6" style="width:971px;height:500px;"></div> -->
												    	</div>
												    	<div class="col-xs-4">
												    		<br>
													    	<br>
													    	<br>
													    	<br>
												    		<table  class="table table-striped table-bordered table-hover" style="margin-bottom: 0px;border-bottom: 0px;">
																<thead>
																	<tr>
																		<th>序号</th>
																		<th>比值内容</th>
																		<th>占比</th>
																	</tr>
																</thead>					
																<tbody id="dataSocialSharing">
																</tbody>
															</table>		
												    	</div>
												    </div>
												</div>
											</div>
										</div>
									</div>
								</div>
								
<!-- ---------------------------------	自定义漏斗 --------------------------------------------------->
								<div id="customizeFunnel" class="tab-pane">
									<div class="row">
										<div class="col-xs-12">
											<div class="clearfix">
												<div class="pull-left tableTools-container">
													<button class="btn btn-xs btn-primary" onclick="newFunnel(this);" style="display: none"><i class="ace-icon fa fa-pencil-square-o align-top bigger-125"></i>新增</button>
													<button class="btn btn-xs btn-danger" onclick="deleteFunnel();" style="display: none"><i class="ace-icon fa fa-trash-o bigger-120"></i>删除</button>
												</div>
											</div>
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group">
																	<label>选择时段</label>
																	<input type="text" id="config-demo9" name="chooseTimeVO" class="form-control time" value="">
																	<button id="funnel_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="funnel_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="funnel_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																<div class="form-group">
																	<label>平台</label>
																	<select data-placeholder="" class="chosen-select" tabindex="2"
																			name="funnel_plat_form" id="funnel_plat_form" onchange="changeVersion(this);">
																		<option value="all">全部</option>;
																		<!-- <option value="pc">PC</option> -->
																		<option value="wap">WAP</option>
																		<option value="app">APP-全部</option>
																		<option value="ios">APP-IOS</option>
																		<option value="android">APP-安卓</option>
																	</select>
																</div>
																<div class="form-group" style="display: none">
																	<label>版本</label>
																	<select data-placeholder="" class="chosen-select" tabindex="2" name="funnel_app_version" id="funnel_app_version">

																	</select>
																</div>
																<div class="form-group">
																	<label>访问类型</label>
																	<div class="btn-group">
																		<label class="btn btn-sm btn-link"> 
																			<input type="radio" name="interview_type" checked value="uv">UV
																		</label>
																		<label class="btn btn-sm btn-link"> 
																			<input type="radio" name="interview_type" value="session">SESSION
																		</label>
																	</div>
																</div>
																<div class="form-group">
																	<button type="button" onclick="searchClick7('1','10');" class="btn btn-pink btn-sm" id="searchFunnel">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>Search
																	</button>
																</div>
															</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-xs-12" id="funnelTable">
											<table  id="simple-table" class="table table-striped table-bordered table-hover">
												<thead>
												 <tr>
													<th class="center">
														<label class="pos-rel">
															<input type="checkbox" class="ace"><span class="lbl"></span>
														</label>
													</th>
													<th>序号</th>
													<th>漏斗名称</th>
													<th>操作人</th>
													<th>创建时间</th>
													 <th>编辑</th>
												 </tr>
												</thead>
												<tbody id="funneldData">
												</tbody>
											</table>
											<div class="ui-jqgrid">
												<div id="grid-pager"
													 class="ui-state-default ui-jqgrid-pager ui-corner-bottom"
													 dir="ltr">
													<div id="pg_grid-pager" class="ui-pager-control" role="group">
														<input type="text" id="currentPage" hidden="true" value=1>
														<input type="text" id="page_size" value=10 hidden="true">
														<input type="text" id="page_total" hidden="true">
														<table cellspacing="0" cellpadding="0" border="0"
															   class="ui-pg-table"
															   style="width: 100%; table-layout: fixed; height: 100%;"
															   role="row">
															<tbody>
															<tr>
																<td id="grid-pager_left" align="left"></td>
																<td id="grid-pager_center" align="center"
																	style="white-space: pre; width: 343px;"><table
																		cellspacing="0" cellpadding="0" border="0"
																		style="table-layout: auto;" class="ui-pg-table">
																	<tbody>
																	<tr>
																		<td id="first_grid-pager"
																			onclick="showPage('firstPage')"
																			class="ui-pg-button ui-corner-all "
																			style="cursor: pointer;"><span
																				class="ui-icon ace-icon fa fa-angle-double-left bigger-140"></span></td>
																		<td id="prev_grid-pager"
																			onclick="showPage('prePage')"
																			class="ui-pg-button ui-corner-all "
																			style="cursor: pointer;"><span
																				class="ui-icon ace-icon fa fa-angle-left bigger-140"></span></td>
																		<td dir="ltr">Page <input class="ui-pg-input" id="page_num"
																								  type="text" size="2" maxlength="7" disabled="true"
																								  value="" role="textbox"> of <span
																				id="sp_1_grid-pager"></span></td>
																		<td id="next_grid-pager"
																			onclick="showPage('nextPage')"
																			class="ui-pg-button ui-corner-all "
																			style="cursor: pointer;"><span
																				class="ui-icon ace-icon fa fa-angle-right bigger-140"></span></td>
																		<td id="last_grid-pager"
																			onclick="showPage('lastPage')"
																			class="ui-pg-button ui-corner-all "
																			style="cursor: pointer;"><span
																				class="ui-icon ace-icon fa fa-angle-double-right bigger-140"></span></td>
																	</tr>
																	</tbody>
																</table></td>

																<td id="grid-pager_right" align="right">
																	<div dir="ltr" style="text-align: right" class="ui-paging-info">View
																		<span id="view_start_row"></span> - <span id="view_end_row"></span>
																		of <span id="view_page_total"></span>
																	</div>
																</td>
															</tr>
															</tbody>
														</table>
													</div>
												</div>
											</div>
										</div>
										<div class="col-xs-6" style="display: none" id="chartDiv">
											<div class="widget-box">
												<div class="widget-body">
													<div class="widget-header widget-header-small">
														<h4 style="color:#000;"><span class="title_funnel"></span>
															<!--<label class="help_img">
																<i class="blue ace-icon fa fa-question-circle bigger-120" style="color:#6f727f!important;"></i>
																<span class='tips'>一段时间内该漏斗<span class="content_name"></span><s></s></span>
															</label>-->
														</h4>
													</div>
													<div class="widget-main">
														<div id="funnelDetail" style="width: 100%; height: 500px; margin: 0 auto;"></div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								
								<div id="other" class="tab-pane">
									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-header widget-header-small">
													<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
												</div>
												<div class="widget-body" style="background-color: #EFF3F8;">
													<div class="widget-main">
														<form class="form-inline" id="searchForm" method="post" action="#">
															<div class="row widget-main">
																<div class="form-group">
														    		<label for="exampleInputName2">选择时段:</label>
														    		<input type="text" id="config-demo7" name="chooseTimeVO" class="form-control time" value="">
														    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		昨日
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去7天
																	</button>
																	<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
																		<span class="ace-icon icon-on-right bigger-110"></span>
																		过去31天
																	</button>
																</div>
																<div class="form-group">
																  	<button id="other_search" type="button"   onclick="searchClick('main7','Other');" class="btn btn-pink btn-sm">
																		<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
																		Search
																	</button>
																</div>
													    	</div>
														</form>
													</div>
												</div>
											</div>
										</div>
									</div>

									<div class="row">
										<div class="col-xs-12">
											<div class="widget-box">
												<div class="widget-body">
												    <div class="widget-main row">
												    	<div id="main7" style="width: 100%; height: 500px; margin: 0 auto;"></div>
												    	<!-- <div id="main7" style="width:971px;height:500px;"></div> -->
												    </div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					
					<div id="statistics" class="tab-pane">
						<div class="row">
							<div class="col-xs-12">
								<div class="widget-box">
									<div class="widget-header widget-header-small">
										<h5 class="widget-title lighter">筛选条件(数据来源v7.8.1及以后版本)</h5>
									</div>
									<div class="widget-body" style="background-color: #EFF3F8;">
										<div class="widget-main">
											<form class="form-inline" id="searchForm" method="post" action="#">
												<div class="row widget-main">
													<div class="form-group">
											    		<label for="exampleInputName2">选择时段:</label>
											    		<input type="text" id="config-demo8" name="chooseTimeVO" class="form-control time" value="">
											    		<button id="app_search" type="button"  onclick="replaceDate(this,'1');" class="btn btn-white btn-sm">
															<span class="ace-icon icon-on-right bigger-110"></span>
															昨日
														</button>
														<button id="app_search" type="button"  onclick="replaceDate(this,'7');" class="btn btn-white btn-sm">
															<span class="ace-icon icon-on-right bigger-110"></span>
															过去7天
														</button>
														<button id="app_search" type="button"  onclick="replaceDate(this,'31');" class="btn btn-white btn-sm">
															<span class="ace-icon icon-on-right bigger-110"></span>
															过去31天
														</button>
													</div>
													<div class="form-group">
														<label for="exampleInputName2"> 品类类型:</label>
														<select data-placeholder="" class="chosen-select" tabindex="2"
																name="app_category_id" id="category_demo8" >
															<option value="">全部</option>
															<#list vSTProductlist as vSTProduct>
															<option value="${vSTProduct.value}">${vSTProduct.showName}</option>
														</#list>
														</select>
													</div>
													<div class="form-group">
													  	<button id="searchlist" type="button"  onclick="searchList();" class="btn btn-pink btn-sm">
															<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
															Search
														</button>
													</div>
												</div>
											</form>
										</div>
									</div>
								</div>
							</div>
						</div>
						
						<div class="row">
							<div class="col-xs-12">
								<div class="widget-box">
									<div class="widget-body">
										<div class="widget-main row">
											<div class="col-xs-8">
												<h3 >流量总计：<span id="session_amount">0</span></h3>
												<div id="main8"></div>
											</div>
											<div class="col-xs-4" style="height: 500px;margin-top: 200px;display: none" id="tableDiv">
												<table  class="table table-striped table-bordered table-hover" style="margin-bottom: 0px;border-bottom: 0px;">
													<thead>
													<tr>
														<th>序号</th>
														<th>流量来源</th>
														<th>流量数据</th>
														<th>占比</th>
													</tr>
													</thead>
													<tbody id="dataF">
													</tbody>
												</table>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
<!-- ----------------------新增漏斗弹层---------------------- -->
			<input type="hidden" id="funnelId" name="funnelId">
			<div class="row">
				<div class="col-xs-12">
					<button class="btn btn-info" data-toggle="modal" type="button" style="display:none;" id="update" data-target="#myModal"></button>
					<form id="updateCode" class="form-horizontal" role="form">
						<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
							 aria-labelledby="myModalLabel" aria-hidden="true">
							<div class="modal-dialog">
								<div class="modal-content">
					<!-- ---------------步骤1 -------------->
									<div id="step1">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
											<h4 class="modal-title" id="funnelLabel">新增漏斗 </h4>
										</div>
										<div class="modal-body">
											<input type="hidden" id="id" name="id" value="">
											<div class="form-group">
												<label class="col-sm-4 control-label no-padding-right" for="form-field-1"><strong class="text-danger">*</strong>漏斗中文名 ：</label>
												<div class="col-sm-8">
													<input type="text" id="funnelName" name="funnelName" placeholder="请输入漏斗名称" value="" class="col-xs-12 col-sm-6">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-4 control-label no-padding-right" for="form-field-1"><strong class="text-danger">*</strong>漏斗类型：</label>
												<div class="btn-group">
													<label class="btn btn-sm btn-link"> 
														<input type="radio" name="funnelType" checked value="品类" id="category">品类
													</label> 
													<label class="btn btn-sm btn-link"> 
														<input type="radio" name="funnelType" value="产品" id="product">产品
													</label>
												</div>
											</div>
										</div>
										<div class="modal-footer">
											<button id="save" type="button" class="btn btn-info" onclick="showNextStep()">下一步 </button>
										</div>
									</div>
					<!-- ---------------步骤2 -------------->
									<div id="step2">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
											<h4 class="modal-title" id="funnelTitle"></h4>
										</div>
										<div class="modal-body">
											<div class="funnel-container">
												<div class="funnel_popbox">
													<div class="funnel_popcont">
														<div class="funnelform">
															<div class="funnellabels">漏斗步骤：</div>
															<ul class="funnelstep drag-panel">
																<li class="liSteps dragable" data-index="0" style="z-index: 990; position: inherit;" onmouseover="showSetting(this)">
																	<div class="step-handle">
																		<span class="ace-icon glyphicon glyphicon-th" style="color:#91d9fa;top:25px;left:6px"></span>
																	</div>
																	<div class="step-container">
																		<div class="funnelstepname funnelSteps">步骤一：</div>
																		<div class="funnelstepcont" style="float: left;margin-left: 10px;">
																			<div class="funelcop" style="position: relative;">
																				<input type="text" id='setValue1' readonly="readonly" style="border-radius: 3px!important;border: 0px;background-color: white!important;" pageCode="">
																			</div>
																		</div>
																		<div id="prompt-box" class="widget-toolbar" style="border-radius:10px;">
																			<a href="javascript:deleteStep();" data-action="close">
																				<i class="ace-icon fa fa-times" style="color:gray;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																			<a href="javascript:editTwoStep();" data-action="settings">
																				<i class="ace-icon fa fa-cog" style="color:#269abc;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																			<a href="javascript:addStep();" data-action="collapse">
																				<i class="ace-icon fa fa-plus" data-icon-show="fa-plus" data-icon-hide="fa-minus" style="color:#269abc;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																		</div>
																	</div>
																</li>
																<li class="liSteps dragable" data-index="1" style="z-index: 990; position: inherit;" onmouseover="showSetting(this)">
																	<div class="step-handle">
																		<span class="ace-icon glyphicon glyphicon-th" style="color:#91d9fa;top:25px;left:6px"></span>
																	</div>
																	<div class="step-container">
																		<div class="funnelstepname funnelSteps">步骤二：</div>
																		<div class="funnelstepcont" style="float: left;margin-left: 10px;">
																			<div class="funelcop" style="position: relative;">
																				<input type="text" readonly="readonly" id='setValue2' pageCode="" style="border-radius: 3px!important;border: 0px;background-color: white!important;">
																			</div>
																		</div>
																		<div id="prompt-box" class="widget-toolbar" style="border-radius:10px;">
																			<a href="javascript:deleteStep();" data-action="close">
																				<i class="ace-icon fa fa-times" style="color:gray;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																			<a href="javascript:editTwoStep();" data-action="settings">
																				<i class="ace-icon fa fa-cog" style="color:#269abc;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																			<a href="javascript:addStep();" data-action="collapse">
																				<i class="ace-icon fa fa-plus" data-icon-show="fa-plus" data-icon-hide="fa-minus" style="color:#269abc;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																		</div>
																	</div>
																</li>
																<li class="liSteps dragable" data-index="2" style="z-index: 990; position: inherit;" onmouseover="showSetting(this)">
																	<div class="step-handle">
																		<span class="ace-icon glyphicon glyphicon-th" style="color:#91d9fa;top:25px;left:6px"></span>
																	</div>
																	<div class="step-container">
																		<div class="funnelstepname funnelSteps">步骤三：</div>
																		<div class="funnelstepcont" style="float: left;margin-left: 10px;">
																			<div class="funelcop" style="position: relative;">
																				<input type="text" readonly="readonly" id='setValue3' pageCode="" style="border-radius: 3px!important;border: 0px;background-color: white!important;">
																			</div>
																		</div>
																		<div id="prompt-box" class="widget-toolbar" style="border-radius:10px;">
																			<a href="javascript:deleteStep();" data-action="close">
																				<i class="ace-icon fa fa-times" style="color:gray;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																			<a href="javascript:editTwoStep();" data-action="settings">
																				<i class="ace-icon fa fa-cog" style="color:#269abc;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																			<a href="javascript:addStep();" data-action="collapse">
																				<i class="ace-icon fa fa-plus" data-icon-show="fa-plus" data-icon-hide="fa-minus" style="color:#269abc;font:normal normal normal 20px/1 FontAwesome"></i>
																			</a>
																		</div>
																	</div>
																</li>
															</ul>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="modal-footer">
											<div class="btn-group pull-right">
												<button class="btn btn-sm btn-info" onclick="saveFunnel();" type="button" id="saveFunnelBUtton">
													<i class="ace-icon fa fa-floppy-o bigger-125"></i>
													Save
												</button>
											</div>
										</div>
									</div>
							<!-----------------步骤3 -------------->
									<div id="step3">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> </button>
											<h3 class="modal-title" id="stepTitle"></h3>
											<input type="hidden" id="flag" value=""/>
											<i class="ace-icon fa fa-chevron-up" style="float: right;font-size: 10px;" onclick="$('#step3').slideUp();">收起</i>
										</div>
										<div class="modal-body">
											<div class="form-group">
												<label class="col-sm-4 control-label no-padding-right" for="form-field-1"> 
													<strong class="text-danger">*</strong>类型
												</label>
												<div class="col-sm-8">
													<input type="text" id="funnelTypeText" name="funnelTypeText"  class="col-xs-12 col-sm-6" disabled="disabled" readonly="readonly">
												</div>
											</div>
											<div class="form-group" id="productDiv">
												<label class="col-sm-4 control-label no-padding-right" for="form-field-1"> <strong class="text-danger">*</strong>请输入</label>
												<div class="col-sm-8">
													<input type="text" id="productId" name="productId"  value="" placeholder="产品id" class="col-xs-12 col-sm-6">
												</div>
											</div>
											<div class="form-group" id="categoryDiv">
												<label class="col-sm-4 control-label no-padding-right" for="form-field-1"> <strong class="text-danger">*</strong>请选择 </label>
												<div class="col-sm-3">
													<select class="form-control" name="categoryId" id="categoryId" onchange="selectPageName(this)">
													</select>
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-4 control-label no-padding-right" for="form-field-1"> <strong class="text-danger">*</strong>页面 </label>
												<div class="col-sm-3">
													<select class="form-control" name="pageName" id="pageName" onchange="selectPindao(this)">
														<option value='3PinDsyw_首页'>首页</option>
														<option value='3PinD_频道页'>频道页</option>
														<option value='3XagQ_详情页'>详情页</option>
														<option value='3TXDD_下单页'>下单页</option>
														<option value='3DaiZ_待支付页'>待支付页</option>
														<option value='3ZhiW_支付完成页'>支付完成页</option>
														<input type="hidden" id="pinDaoCode" name="pinDaoCode">
													</select>
												</div>
												<div class="col-sm-3" style="display: none" id="pindaoSelect">
													<select class="form-control" name="pinDao" id="pinDao">
													</select>
												</div>
											</div>
										</div>
										<div class="modal-footer">
											<div class="btn-group pull-right">
												<button class="btn btn-info" type="button" onclick="saveStep();">
													<i class="ace-icon fa fa-check bigger-110"></i>
												</button>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
			
		</div>
		
		<div id="oper-box" class="widget-toolbar" style="background-color: #EBEBEB;border-radius:10px;display: none;">
			<a href="javascript:deleteStep();" data-action="close">
				<i class="ace-icon fa fa-times" style="color:gray;font:normal normal normal 20px/1 FontAwesome"></i>
			</a>
			<a href="javascript:editTwoStep();" data-action="settings">
				<i class="ace-icon fa fa-cog" style="color:#3071a9;font:normal normal normal 20px/1 FontAwesome"></i>
			</a>
			<a href="javascript:addStep();" data-action="collapse">
				<i class="ace-icon fa fa-plus" data-icon-show="fa-plus" data-icon-hide="fa-minus" style="color:#3071a9;font:normal normal normal 20px/1 FontAwesome"></i>
			</a>
		</div>
		
		<script src="${request.contextPath}/assets/js/jquery.2.1.1.min.js"></script>
		<script src="${request.contextPath}/assets/js/bootstrap.min.js"></script>
		<script src="${request.contextPath}/assets/js/jquery-ui.custom.min.js"></script>
		<script src="${request.contextPath}/assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="${request.contextPath}/assets/js/bootbox.min.js"></script>
		<script src="${request.contextPath}/assets/js/spin.min.js"></script>
		<script src="${request.contextPath}/assets/js/ace-elements.min.js"></script>
		<script src="${request.contextPath}/assets/js/ace.min.js"></script>
		<script src="${request.contextPath}/assets/js/bootstrapValidator.min.js"></script>
		<script src="${request.contextPath}/assets/js/user/base.js"></script>
		<script src="${request.contextPath}/assets/js/ace-extra.min.js"></script>
		<script src="${request.contextPath}/assets/js/moment.min.js"></script>
		<script src="${request.contextPath}/assets/js/bootstrap-datetimepicker.min.js"></script>
		<script type="text/javascript" src="${request.contextPath}/javascripts/jquery.2.1.1.min.js"></script>
	   	<script type="text/javascript" src="${request.contextPath}/javascripts/bootstrap.min.js"></script>
	   	<script type="text/javascript" src="${request.contextPath}/javascripts/moment.js"></script>
	   	<script type="text/javascript" src="${request.contextPath}/javascripts/daterangepicker.js"></script>
	   	<script src="${request.contextPath}/assets/js/jquery.gritter.min.js"></script>
	   	<script src="${request.contextPath}/assets/js/chosen.jquery.js"></script>
        <script type="text/javascript" src="${request.contextPath}/javascripts/dateRange.js"></script>
		<script type="text/javascript" src="${request.contextPath}/javascripts/g2.js"></script>
		<script type="text/javascript" src="${request.contextPath}/javascripts/g2-modal.js"></script>
		<script>var contextPath = '${request.contextPath}';</script>
		<script type="text/javascript" src="${request.contextPath}/javascripts/loading.js"></script>
		<script type="text/javascript" src="${request.contextPath}/javascripts/funnel.js"></script>

		<script type="text/javascript">
			var list;
			var yDataAmonut1=[];
			var funnelIndex = 0;
			function changeplat(val){
				if(val != -1){
					$.ajax({
						url : "${request.contextPath}/common/appversion",
						data : {
							"platForm" : val
						},
						dataType : "json",
						success : function(data) {
							if (data != null) {
								var len = val.length;
								$("select[name='app_version']").empty();
								var list = data.list;
								list.sort(function(a, b) {return a.name > b.name});
								var option = $("<option>").val("").text("全部");
								$("select[name='app_version']").append(option);
		                        for(var i = 0; i < list.length; i++)
		                        {
		                            var option = $("<option>").val(list[i].code).text(list[i].name.substring(len));
		                            $("select[name='app_version']").append(option);
		                        }
							}
						}
					});
				}else{
					$("select[name='app_version']").empty();
					var option = $("<option>").val("").text("全部");
					$("select[name='app_version']").append(option);
				}
			};

			function checkAll(elm,check_name){
				if (elm.checked) {
					$("input[name="+check_name+"]").each(function() {
						this.checked = true;
					});
				} else {
					$("input[name="+check_name+"]").each(function() {
						this.checked = false;
					});
				}

			};

			var toList;
			function searchList() {
				var chooseTime = $("#config-demo8").val();
				var categoryId = $("#category_demo8").val();
				$.ajax({
					url : "${request.contextPath}/traffic/queryFlowStatisticsData",
					data : {
						"chooseTime" : chooseTime,
						"beginDate":chooseTime.split("-")[0].trim(),
						"endDate":chooseTime.split("-")[1].trim(),
                        "categoryId": categoryId
					},
					dataType : "json",
					beforeSend: function(){
		    			   $("#searchlist").attr("disabled",true);
			    		},
	    			    complete: function(){
	    			    	$("#searchlist").attr("disabled",false);
	    			    },
					success : function(data) {
						if (data != null) {
							$("#dataF").empty();
							toList = data.list;
							var defaultLength = data.defaultLength;
							var amountF = data.amountF;
							var seriesDataf = data.seriesDataf;
							var xAxisDataf = data.xAxisDataf;

							$("#session_amount")[0].innerText = amountF;
							var arr = [];
							for(var i=0;i<xAxisDataf.length;i++){
								if(xAxisDataf[i] != null){
									arr.push({name:toList[xAxisDataf[i]-1].flowSource,value:seriesDataf[i]});
								}
							}
							var defs = {
								'name': {
									alias : '流量来源'
								},
								'value': {
									alias :'流量数据'
								}
							};
							var chart = histogramModal(arr,'main8','name','value','流量来源','流量数据',450,defs);
							if(chart != undefined){
								chart.on('tooltipchange', function(ev) {
									var items = ev.items; // tooltip显示的项
									var origin = items[0]; // 将一条数据改成多条数据
									var proportion = origin.value/amountF*100;
									items.push({
										name: "占比",
										title: origin.title,
										marker: true,
										color: origin.color,
										value :proportion.toFixed(2)+"%"
									});
								});
							}
							var i;
							if(toList != null && toList.length > 0){
								for (i = 0; i < defaultLength && i<toList.length; i++) {
									var html = "<tr><td>" + eval(i + "+1") + "</td>"
											+ "<td>"+ toList[i].flowSource + "</td>"
											+ "<td>"+ toList[i].flowData + "</td>"
											+ "<td>" + toList[i].flowRate + "%</td></tr>";
									$("#dataF").append(html);
								}
								i++;
								var amountRate = "100%";
								if(amountF == 0 || amountF == null){
									amountRate = "0.00%";
								}
								var sumhtmlf = "<tr><td>" + i++ + "</td>"
										+ "<td>总计</td>" + "<td>"+ amountF + "</td>"
										+ "<td>" + amountRate+ "</td></tr>";
								$("#dataF").append(sumhtmlf);
								$("#tableDiv").show();
							}else{
								$("#tableDiv").hide();
							}
						}
					}
				});
			};
			function searchClick(elm_id,tab_id,category_el_id,data_div) {
				var chooseTime = $("#config-demo").val();
				var channel_code = $("#channel_code").val();
				var platform_code = $("#platform_code").val();
				var app_version = "";  //$("#app_version").val();取消版本
				var plat_form = $("#plat_form").val();
				var category_id = $("#category_id").val();
				var flow_type = $("input[name='flow_type']:checked").val();
				queryFunnel(elm_id,flow_type, "", plat_form,app_version, "", tab_id,category_el_id,chooseTime,"路径页",data_div,"");
			};
			function searchClick2(elm_id,tab_id,category_el_id,data_div) {
				var chooseTime = $("#config-demo2").val();
				var flow_type = $("input[name='flow_type2']:checked").val();//访问类型
				//var platform = $("#plat_form2").val();//平台类型
				var platform = pcAndWapPlatform;//平台类型
				//alert(flow_type+":"+platform);
				queryFunnel(elm_id,flow_type, "", platform,"", "", tab_id,category_el_id,chooseTime,"路径页",data_div,"");
			};
			function searchClick3(elm_id,tab_id,category_el_id,data_div) {
				var chooseTime = $("#config-demo3").val();
				queryFunnel(elm_id,"", "", "","", "", tab_id,category_el_id,chooseTime,"专题页",data_div,"");
			};
			function searchClick4(elm_id,tab_id,category_el_id,data_div) {
				var chooseTime = $("#config-demo4").val();
				var semPage = $("#semPage").val();
				queryFunnel(elm_id,"", "", "","", "", tab_id,category_el_id,chooseTime,"SEM着陆页",data_div,semPage);
			};
			function searchClick5(elm_id,tab_id,category_el_id,data_div) {
				var chooseTime = $("#config-demo5").val();
				var seoSource = $("#seoSource").val();
				var seoPage = $("#seoPage").val();
				queryFunnel(elm_id,"", seoSource, "","", "", tab_id,category_el_id,chooseTime,"SEO流量",data_div,seoPage);
			};
			function searchClick6(elm_id,tab_id,category_el_id,data_div) {
				var chooseTime = $("#config-demo6").val();
				var socialSource = $("#social").val();
				queryFunnel(elm_id,"", socialSource, "","", "", tab_id,category_el_id,chooseTime,"社交分享",data_div,"");
			};

			function queryFunnel(id, flow_type, channel_code, platform,platform_code, category_id,tab_id,category_el_id,
					chooseTime,funnelText,data_div,land_code) {
				$.ajax({
					url : "${request.contextPath}/traffic/queryfunnel",
					type:"GET",
					data : {
						"channelCode" : channel_code,
						"platform" : platform,
						"platformCode" : platform_code,
						"categoryId" : category_id,
						"chooseTime" : chooseTime,
						"beginDate":chooseTime.split("-")[0].trim(),
						"endDate":chooseTime.split("-")[1].trim(),
						"tabId" : tab_id,
						"landCode" : land_code
					},
					dataType : "json",
					success : function(data) {
						if (data != null) {
							list  = data.list;
							var category_id = $("#"+category_el_id).val();
							var amount = 0;
							var detailAmount = 0;
							var orderAmount = 0;
							var payAmount = 0;
							if(list != null && list.length > 0)
							{
								for(var i=0;i<list.length;i++)
								{
									var type_amount = list[i].amount;
									//if(i==1) alert(list[i].amount+":"+flow_type+":"+list[i].uv);
									if(flow_type == 'uv'){
										type_amount = list[i].uv;
									};
                                    if(flow_type == 'session'){
                                        type_amount = list[i].se;
                                    };
									amount = amount + type_amount;
									if(category_id != null && category_id != "")
									{
										if(list[i].category_id != category_id){
											if(!("3XagQ"==list[i].page_code && (category_id == '11' ||category_id == '12'||category_id == '13') && (list[i].category_id == '11' ||list[i].category_id == '12'||list[i].category_id == '13'))){
												continue;
											}
										}
									}
									if("3XagQ"==list[i].page_code)
										detailAmount = detailAmount + type_amount;
									else if("3TXDD"==list[i].page_code)
										orderAmount = orderAmount + type_amount;
									else if("3DaiZ"==list[i].page_code)
										payAmount = payAmount + type_amount;
								}

							}
							yDataAmonut1 = [{"name":funnelText,"value":amount},
							                          {"name":"详情页","value":detailAmount},
													  {"name":"填写订单页","value":orderAmount},
													  {"name":"待支付页","value":payAmount}];
							funnelModal(yDataAmonut1,id,'name','value',flow_type,500);
							$(data_div).empty();
							var html = "<tr><td>" + 1 + "</td>"+ "<td>"+ "详情页/"+funnelText + "</td>"+"<td>" + rate(detailAmount, amount) + "%</td></tr>"
							+"<tr><td>" + 2 + "</td>"+ "<td>"+ "填写订单页/"+funnelText + "</td>"+"<td>" + rate(orderAmount, amount) + "%</td></tr>"
							+"<tr><td>" + 3 + "</td>"+ "<td>"+ "待支付页/"+funnelText + "</td>"+"<td>" + rate(payAmount, amount) + "%</td></tr>"
							//+"<tr><td>" + 4 + "</td>"+ "<td>"+ "填写订单页/详情页" + "</td>"+"<td>" + rate(orderAmount, detailAmount) + "%</td></tr>"
							+"<tr><td>" + 50 + "</td>"+ "<td>"+ "待支付页/详情页" + "</td>"+"<td>" + rate(payAmount, detailAmount) + "%</td></tr>"
							+"<tr><td> " + 6 + "</td>"+ "<td>"+ "待支付页/填写订单页" + "</td>"+"<td>" + rate(payAmount, orderAmount) + "%</td></tr>";
							//alert(html);
							$(data_div).append(html);
							changeCategory(category_id,id,funnelText,data_div,flow_type);
						}
					}
				});

			};

			function rate(molecular,denominator){
				if(denominator == 0){
					return 0;
				}else{
					return Math.round(molecular / denominator * 10000) / 100.00;
				}
			}

			function changeCategory(value,id,funnelText,data_div,flow_type) {
			    if(value == "88"){
                    statisticsAdvisor(value,id,funnelText,data_div,flow_type);
                    return;
				}
				var amount = 0;
				var detailAmount = 0;
				var orderAmount = 0;
				var payAmount = 0;
				var category_id = value;
				if(list != null && list.length > 0){
					for(var i=0;i<list.length;i++){ 
						var type_amount = list[i].amount;
						if(flow_type == 'uv'){
							type_amount = list[i].uv;
						}
						if(flow_type == 'session'){
						    type_amount =list[i].se;
						}
						amount = amount + type_amount;
						if(category_id != null && category_id != ""){
							if(list[i].category_id != category_id){
								if(!("3XagQ"==list[i].page_code && (category_id == '11' ||category_id == '12'||category_id == '13') && (list[i].category_id == '11' ||list[i].category_id == '12'||list[i].category_id == '13'))){
									continue;
								}
							}
						}
						if("3XagQ"==list[i].page_code)
							detailAmount = detailAmount + type_amount;
						else if("3TXDD"==list[i].page_code)
							orderAmount = orderAmount + type_amount;
						else if("3DaiZ"==list[i].page_code)
							payAmount = payAmount + type_amount;
					}

				}
				var viewData = new Array();
				var arr = [];
				if(value != ""){
					arr = [{"name":"详情页","value":detailAmount},
						{"name":"填写订单页","value":orderAmount},
						{"name":"待支付页","value":payAmount}];
				}else{
					arr = [{"name":funnelText,"value":amount},
						{"name":"详情页","value":detailAmount},
						{"name":"填写订单页","value":orderAmount},
						{"name":"待支付页","value":payAmount}];
				}
				yDataAmonut1 = arr;
				var flow_type =  $("input[name='flow_type']:checked").val();
				if("main2" == id){
                    flow_type =  $("input[name='flow_type2']:checked").val();
				}
				funnelModal(yDataAmonut1,id,'name','value',flow_type,500);
				$(data_div).empty();
				var html = "";
				if(value == 0){
					html += "<tr><td>" + 1 + "</td><td>"+ "详情页/"+funnelText + "</td>"+"<td>" + rate(detailAmount, amount) + "%</td></tr>"
							+"<tr><td>" + 2 + "</td>"+ "<td>"+ "填写订单页/"+funnelText + "</td>"+"<td>" + rate(orderAmount, amount) + "%</td></tr>"
							+"<tr><td>" + 3 + "</td>"+ "<td>"+ "待支付页/"+funnelText + "</td>"+"<td>" + rate(payAmount, amount) + "%</td></tr>"
							+"<tr><td>" + 4 + "</td>"+ "<td>"+ "填写订单页/详情页" + "</td>"+"<td>" + rate(orderAmount, detailAmount) + "%</td></tr>"
							+"<tr><td>" + 5 + "</td>"+ "<td>"+ "待支付页/详情页" + "</td>"+"<td>" + rate(payAmount, detailAmount) + "%</td></tr>"
							+"<tr><td>" + 6 + "</td>"+ "<td>"+ "待支付页/填写订单页" + "</td>"+"<td>" + rate(payAmount, orderAmount) + "%</td></tr>";
				}
				html += "<tr><td>" + 1 + "</td>"+ "<td>"+ "填写订单页/详情页" + "</td>"+"<td>" + rate(orderAmount, detailAmount) + "%</td></tr>"
				+"<tr><td>" + 2 + "</td>"+ "<td>"+ "待支付页/详情页" + "</td>"+"<td>" + rate(payAmount, detailAmount) + "%</td></tr>"
				+"<tr><td>" + 3 + "</td>"+ "<td>"+ "待支付页/填写订单页" + "</td>"+"<td>" + rate(payAmount, orderAmount) + "%</td></tr>";
				$(data_div).append(html);

			};

			function statisticsAdvisor(value,id,funnelText,data_div,flow_type) {
				var amount=0;
				var advisorAmount = 0;
				var submitAmount = 0;
//				var detailAmount = 0;
//				var orderAmount = 0;
//				var payAmount = 0;
//				var category_id = value;
				if(list != null && list.length > 0){
					for(var i=0;i<list.length;i++){
						var type_amount = 0;
						if(flow_type == 'uv'){
							type_amount = list[i].uv;
						}else{
							type_amount = list[i].amount;
						}
						
						if("3jqnxqoy"==list[i].page_code)
                            advisorAmount = advisorAmount + type_amount;
						else if("3jqnxb70"==list[i].page_code)
                            submitAmount = submitAmount + type_amount;
					}

				}
				var viewData = new Array();
				var arr = [];
                arr = [{"name":"意见反馈页","value":advisorAmount},
                    {"name":"意见反馈提交","value":submitAmount}];
				yDataAmonut1 = arr;
				var flow_type =  $("input[name='flow_type']:checked").val();
				funnelModal(yDataAmonut1,id,'name','value',flow_type,500);
				$(data_div).empty();
				var html = "";
//				if(value == 0){
//					html += "<tr><td>" + 1 + "</td><td>"+ "详情页/"+funnelText + "</td>"+"<td>" + rate(detailAmount, amount) + "%</td></tr>"
//							+"<tr><td>" + 2 + "</td>"+ "<td>"+ "填写订单页/"+funnelText + "</td>"+"<td>" + rate(orderAmount, amount) + "%</td></tr>"
//							+"<tr><td>" + 3 + "</td>"+ "<td>"+ "待支付页/"+funnelText + "</td>"+"<td>" + rate(payAmount, amount) + "%</td></tr>"+
//							+"<tr><td>" + 4 + "</td>"+ "<td>"+ "填写订单页/详情页" + "</td>"+"<td>" + rate(orderAmount, detailAmount) + "%</td></tr>"
//							+"<tr><td>" + 5 + "</td>"+ "<td>"+ "待支付页/详情页" + "</td>"+"<td>" + rate(payAmount, detailAmount) + "%</td></tr>"
//							+"<tr><td>" + 6 + "</td>"+ "<td>"+ "待支付页/填写订单页" + "</td>"+"<td>" + rate(payAmount, orderAmount) + "%</td></tr>";
//				}
				html += "<tr><td>" + 1 + "</td>"+ "<td>"+ "意见反馈提交/意见反馈" + "</td>"+"<td>" + rate(submitAmount, advisorAmount) + "%</td></tr>"
//				+"<tr><td>" + 2 + "</td>"+ "<td>"+ "待支付页/详情页" + "</td>"+"<td>" + rate(payAmount, detailAmount) + "%</td></tr>"
//				+"<tr><td>" + 3 + "</td>"+ "<td>"+ "待支付页/填写订单页" + "</td>"+"<td>" + rate(payAmount, orderAmount) + "%</td></tr>";
				$(data_div).append(html);

			};

		 $(function() {
			 searchClick('main1','app','app_category_id','#dataAPP');
			 /* searchClick('main1','app','app_category_id','#dataAPP');
			 searchClick2('main2','Wap','category_id2','#dataM');
			 //searchClick3('main3','Topic','category_id3','#dataProject');
			 searchClick4('main4','SEM','category_id4','#dataSEM');
			 searchClick5('main5','SEO','category_id5','#dataSEO');
			 searchClick6('main6','Society','category_id6','#dataSocialSharing'); */
			 //searchList();
	        $('.chosen-select').chosen();
	       	$('.chosen-select-deselect').chosen({ allow_single_deselect: true });
	     });
		 var  pcAndWapPlatform = 'PC';
		 function statistics(obj){
			 if(obj == '#app' || obj == '#manage'){
				 $('#manage').show();
				 $('#app').show();
				 $('#m').hide();
				 //$('#project').hide();
				 $('#sem').hide();
				 $('#seo').hide();
				 $('#socialSharing').hide();
				 $('#statistics').hide();
				 $('#customizeFunnel').hide();
				 searchClick('main1','app','app_category_id','#dataAPP');
			 }else if(obj == '#m' || obj == '#pc'){
				 $('#manage').show();
				 $('#app').hide();
				 $('#m').show();
				 //$('#project').hide();
				 $('#sem').hide();
				 $('#seo').hide();
				 $('#socialSharing').hide();
				 $('#statistics').hide();
				 $('#customizeFunnel').hide();
				 if (obj == '#m'){
                     pcAndWapPlatform = 'wap'
				 }else{
                     pcAndWapPlatform = 'PC'
				 }
                 searchClick2('main2','Wap','category_id2','#dataM');
			 }else if(obj == '#project'){
				 $('#manage').show();
				 $('#app').hide();
				 $('#m').hide();
				 //$('#project').show();
				 $('#sem').hide();
				 $('#seo').hide();
				 $('#socialSharing').hide();
				 $('#statistics').hide();
				 $('#customizeFunnel').hide();
			 }else if(obj == '#sem'){
				 $('#manage').show();
				 $('#app').hide();
				 $('#m').hide();
				 //$('#project').hide();
				 $('#sem').show();
				 $('#seo').hide();
				 $('#socialSharing').hide();
				 $('#statistics').hide();
				 $('#customizeFunnel').hide();
				 searchClick4('main4','SEM','category_id4','#dataSEM');
				 //showMsg("该功能尚未开通！");
			 }else if(obj == '#seo'){
				 $('#manage').show();
				 $('#app').hide();
				 $('#m').hide();
				 //$('#project').hide();
				 $('#sem').hide();
				 $('#seo').show();
				 $('#socialSharing').hide();
				 $('#statistics').hide();
				 $('#customizeFunnel').hide();
				 searchClick5('main5','SEO','category_id5','#dataSEO');
				 //showMsg("该功能尚未开通！");
			 }else if(obj == '#socialSharing'){
				 $('#manage').show();
				 $('#app').hide();
				 $('#m').hide();
				 //$('#project').hide();
				 $('#sem').hide();
				 $('#seo').hide();
				 $('#socialSharing').show();
				 $('#statistics').hide();
				 $('#customizeFunnel').hide();
				 searchClick6('main6','Society','category_id6','#dataSocialSharing');
				 //showMsg("该功能尚未开通！");
			 }else if(obj == '#customizeFunnel'){
				 $('#manage').show();
				 $('#app').hide();
				 $('#m').hide();
				 $('#sem').hide();
				 $('#seo').hide();
				 $('#socialSharing').hide();
				 $('#statistics').hide();
				 $('#customizeFunnel').show();
                 recoverButtonColor($("#config-demo9").siblings("button"));
                 changeButtonColor($("#config-demo9").siblings("button").eq(0));
				 startDate = new Date(new Date().getTime()-1*1000*60*60*24);
				 endDate = new Date(new Date().getTime()-1*1000*60*60*24);
				 var dateStr = dateFormat(startDate) + " - " + dateFormat(endDate);
				 $("#config-demo9").val(dateStr);
				 searchClick7("1","10");
			 }else if(obj == '#statistics'){
				 $('#manage').hide();
				 $('#app').hide();
				 $('#m').hide();
				 //$('#project').hide();
				 $('#sem').hide();
				 $('#seo').hide();
				 $('#socialSharing').hide();
				 $('#customizeFunnel').hide();
				 $('#statistics').show();
				 searchList();
			 }

			$('.chosen-select').chosen("destroy").chosen();
	       	$('.chosen-select-deselect').chosen({ allow_single_deselect: true });
		 }
		 
		function selectAppVersion(){
    		var platForm = $("#plat_form").val();
        	if(platForm == "ios" || platForm == "android"){
				$("#app_version").parent(".form-group").show();
				$('.chosen-select').chosen("destroy").chosen();
				$('.chosen-select-deselect').chosen({ allow_single_deselect: true });
				$.ajax({
					url : contextPath+'/traffic/appVersion',
					type : "POST",
					data : {
						platForm : platForm
					},
					success:function(data) {
						if(data.code == 1) {
							var list = data.msg;
							list.sort(function(a, b) {return a.name > b.name});
							var html = '<option value="">全部</option>';
							for(var i=0;i<list.length;i++){
								html += '<option value="'+list[i].value+'">'+list[i].name+'</option>';
							}
							$("#app_version").html(html);
							$('#app_version').chosen("destroy").chosen();
						}
					},
					error:function(data) {
					}
				});
			}else{
				$("#app_version").parent(".form-group").hide();
			}
    	}

	</script>
</body>
</html>